#include<bits/stdc++.h>
using namespace std;
const int N = 1e5 + 10;
int n, m;
vector<int> v[100010];
int in[N];
int bfs(){
    vector<int> res;
    queue<int> q;
    for (int i = 1; i <= n; i++){
        if (in[i] == 0)
            q.push(i);
    }
    while(!q.empty()){
        int f = q.front();
        res.push_back(f);
        q.pop();
        for (auto t : v[f]){
            in[t] --;
            if (in[t] == 0){
                q.push(t);
            }
        }
    }
    if (res.size() == n){
        for (auto i : res){
            printf("%d ", i);
        }
    }
    else
        cout << -1 << endl;

}   
int main(){
    cin >> n >> m;
    for (int i = 1; i <= m; i++){
        int a, b;
        cin >> a >> b;
        v[a].push_back(b);
        in[b]++;
    }
    bfs();

}